
/**
 * @description 加载大事记方法
 * @author Huang Yuehong
 * @since 2018-06-27 02:08:45
 */
function loadhistory(year){

    var historydiv = $('#h'+ year);// 大事记div

    // 获取大事记相关数据的请求地址
    var loadHistoryUrl = "/about/loadhistory/" +year;

    // ajax获取大事记新闻数据到前台页面
    $.ajax({
        url:loadHistoryUrl,
        type:"get",
        dataType:"json",
        success:function(data){
            var map = eval("("+data+")");
            var newsMapList = map['newsMapList'];

            var length = newsMapList.length;
            var dlContent = '';

            // 加载新的新闻数据到div中
            for(var i=0;i< length;i++){
                var content = "<div class=\"yearTitle\"><span class=\"open\">2018.03</span></div>\n" +
                 "                 <div class=\"yearMain\">\n" +
                 "                 <dl>\n" +
                 "                     <dt><span></span>2018.3.10</dt>\n" +
                 "                     <dd>协会获得国家“人才素质测评新技术系统建设项目\n" +
                 "                       ”授权评价服务机构</dd>\n" +
                 "                     <dd><img src=\"/static/images/hisotry_11.jpg\"/></dd>\n" +
                 "                   </dl>\n" +
                 "                 </div>\n" +
                 "             <div class=\"yearLine\"></div>";




                /*var content = "<dl id=\"newsMapList[i]['id']\">\n" + "<dt><span><font>"+newsMapList[i]['year']+"</font><font>"+newsMapList[i]['monthDay']+"</font></dt>\n";

                if (newsMapList[i]['picture'] != null && newsMapList[i]['picture'] != ''){
                    content = content + "<dd><img src=\""+ newsMapList[i]['picture'] +"\"/></dd>\n";
                }else{
                    content = content + "<dd><img src=\"/static/images/nophoto.png\"/></dd>\n";
                }
                    content = content + "<dd><a href=\"/webnews/detail/"+newsMapList[i]['id']+"/"+newsMapList[i]['category']+"\" target=\"_blank\" >"+ newsMapList[i]['title'] +"</a></dd>\n" +
                                        "<dd><span>"+ newsMapList[i]['description'] +"</span></dd>\n" +
                                        "<dd><span>"+ newsMapList[i]['interval'] +"</span><span>"+ newsMapList[i]['readtimes'] +"</span><span>"+ newsMapList[i]['keyword'] +"</span></dd>\n" +
                                    "</dl>";
                dlContent = dlContent + content;*/
            }
            $('#newsDiv').append(dlContent);

            if (isShowLoadMore == 0){
                loadmorediv.attr("style","display:none;");//隐藏“浏览更多”按钮
            }

        },
        error:function(XMLHttpRequest,textStatus, errorThrown) {
            // alert(errorThrown);
        }
    });
}